package com.kawa.kemanage.entity.vo;

import lombok.Data;

import java.util.List;

/**
 * @Author: KAIyo
 * @Date: 2025/6/25 15:49
 * @Version: v1.0.0
 * @Description: 这是三个消息的未读取数量
 **/
@Data
public class UnreadCountVO {
    private Integer systemMessageCount;
    private Integer commentMessageCount;
    private Integer likeMessageCount;


    // 未读计数
    private Integer unreadCount;

    // 通知类型
    private static final String REMINDER = "reminder";
    private static final String SYSTEM = "system" ;
    private static final String ACTIVITY = "activity";

    public void setTypeCount(String type, Integer unreadCount) {
        switch (type) {
            case SYSTEM:
                this.systemMessageCount = unreadCount;
                break;
            case REMINDER:
                this.commentMessageCount = unreadCount;
                break;
            case ACTIVITY:
                this.likeMessageCount = unreadCount;
                break;
            default:
                break;
        }
    }
    public Integer sumUnreadCount() {
        this.unreadCount = this.systemMessageCount + this.commentMessageCount + this.likeMessageCount;
        return this.unreadCount;
    }
}


